data: Added CxxParser, currently only detecting classes
This change adds CxxParser a class for parsing cxx files. It holds basic functionality to detect classes using the clang libTooling classes. CxxParser is derived from a common Parser interface, which can later be used for other language parsers. The Parser forwards detected elements to a ParserClient interface, which is implemented by the Storage class. The detected classes only get logged so far. review id = 6 * bd3c63a - (HEAD, origin/class, class) applied second review <Eberhard Graether> (4 minutes ago) * 3db7d93 - added missing files <Eberhard Graether> (4 days ago) * 6d09f4e - applied review <Eberhard Graether> (4 days ago) * d9d3e64 - fixed CMake files <Eberhard Graether> (4 days ago) * f22a771 - only one Storage class <Eberhard Graether> (4 days ago) * 6ee9553 - added tests <Eberhard Graether> (4 days ago) * 0a525e8 - fixed includes <Eberhard Graether> (4 days ago) * ca3fbb8 - added StorageManager as ParserClient <Eberhard Graether> (4 days ago) * fa185a5 - renamed ParseLocation to ParseObject <Eberhard Graether> (4 days ago) * 8b89808 - pass location with ParseLocation object <Eberhard Graether> (4 days ago) * 548ae3c - renamed clang AST classes <Eberhard Graether> (4 days ago) * d3b2caf - cleaned includes <Eberhard Graether> (4 days ago) * f7fdf33 - removed using namespace stmts <Eberhard Graether> (4 days ago) * 5378ef6 - using ParserClient <Eberhard Graether> (4 days ago) * b9ce2f6 - working with test file <Eberhard Graether> (4 days ago) * 5585abc - added CxxParser and ParserClient <Eberhard Graether> (4 days ago)
This commit is contained in:
+8
-8
@@ -5,34 +5,34 @@
|
||||
|
||||
#include "data/access/CodeAccess.h"
|
||||
#include "data/access/GraphAccess.h"
|
||||
#include "data/GraphStorage.h"
|
||||
#include "data/Parser.h"
|
||||
#include "data/Storage.h"
|
||||
#include "ProjectSettings.h"
|
||||
|
||||
class Project
|
||||
{
|
||||
public:
|
||||
static std::shared_ptr<Project> create(
|
||||
const std::shared_ptr<CodeAccess>& codeAccess,
|
||||
const std::shared_ptr<GraphAccess>& graphAccess);
|
||||
std::shared_ptr<CodeAccess> codeAccess,
|
||||
std::shared_ptr<GraphAccess> graphAccess
|
||||
);
|
||||
|
||||
~Project();
|
||||
|
||||
const ProjectSettings& getProjectSettings() const;
|
||||
|
||||
void parseCode();
|
||||
|
||||
private:
|
||||
Project();
|
||||
Project(const Project&);
|
||||
Project operator=(const Project&);
|
||||
|
||||
ProjectSettings m_settings;
|
||||
|
||||
std::shared_ptr<Parser> m_parser;
|
||||
|
||||
std::shared_ptr<GraphStorage> m_graphStorage;
|
||||
std::shared_ptr<Storage> m_storage;
|
||||
|
||||
std::shared_ptr<CodeAccess> m_codeAccess;
|
||||
std::shared_ptr<GraphAccess> m_graphAccess;
|
||||
};
|
||||
|
||||
|
||||
#endif // PROJECT_H
|
||||
|
||||
Reference in New Issue
Block a user