test: added GraphFilter and GraphFilterConductor tests
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "data/parser/Parser.h"
|
||||
|
||||
Parser::Parser(std::shared_ptr<ParserClient> client)
|
||||
Parser::Parser(ParserClient* client)
|
||||
: m_client(client)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -12,14 +12,14 @@ class TextAccess;
|
||||
class Parser
|
||||
{
|
||||
public:
|
||||
Parser(std::shared_ptr<ParserClient> client);
|
||||
Parser(ParserClient* client);
|
||||
virtual ~Parser();
|
||||
|
||||
virtual void parseFiles(const std::vector<std::string>& filePaths) = 0;
|
||||
virtual void parseFile(std::shared_ptr<TextAccess> textAccess) = 0;
|
||||
|
||||
protected:
|
||||
std::shared_ptr<ParserClient> m_client;
|
||||
ParserClient* m_client;
|
||||
};
|
||||
|
||||
#endif // PARSER_H
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "data/parser/cxx/ASTAction.h"
|
||||
|
||||
ASTAction::ASTAction(std::shared_ptr<ParserClient> client)
|
||||
ASTAction::ASTAction(ParserClient* client)
|
||||
: m_client(client)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
class ASTAction : public clang::ASTFrontendAction
|
||||
{
|
||||
public:
|
||||
explicit ASTAction(std::shared_ptr<ParserClient> client);
|
||||
explicit ASTAction(ParserClient* client);
|
||||
virtual ~ASTAction();
|
||||
|
||||
virtual clang::ASTConsumer* CreateASTConsumer(clang::CompilerInstance& compiler, llvm::StringRef inFile);
|
||||
|
||||
private:
|
||||
std::shared_ptr<ParserClient> m_client;
|
||||
ParserClient* m_client;
|
||||
};
|
||||
|
||||
#endif // AST_ACTION_H
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "data/parser/cxx/ASTActionFactory.h"
|
||||
|
||||
ASTActionFactory::ASTActionFactory(std::shared_ptr<ParserClient> client)
|
||||
ASTActionFactory::ASTActionFactory(ParserClient* client)
|
||||
: m_client(client)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
class ASTActionFactory : public clang::tooling::FrontendActionFactory
|
||||
{
|
||||
public:
|
||||
explicit ASTActionFactory(std::shared_ptr<ParserClient> client);
|
||||
explicit ASTActionFactory(ParserClient* client);
|
||||
virtual ~ASTActionFactory();
|
||||
|
||||
virtual clang::FrontendAction* create();
|
||||
|
||||
private:
|
||||
std::shared_ptr<ParserClient> m_client;
|
||||
ParserClient* m_client;
|
||||
};
|
||||
|
||||
#endif // AST_ACTION_FACTORY
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "data/parser/cxx/ASTConsumer.h"
|
||||
|
||||
ASTConsumer::ASTConsumer(clang::ASTContext* context, std::shared_ptr<ParserClient> client)
|
||||
ASTConsumer::ASTConsumer(clang::ASTContext* context, ParserClient* client)
|
||||
: m_visitor(context, client)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
class ASTConsumer : public clang::ASTConsumer
|
||||
{
|
||||
public:
|
||||
explicit ASTConsumer(clang::ASTContext* context, std::shared_ptr<ParserClient> client);
|
||||
explicit ASTConsumer(clang::ASTContext* context, ParserClient* client);
|
||||
virtual ~ASTConsumer();
|
||||
|
||||
virtual void HandleTranslationUnit(clang::ASTContext& context);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "data/parser/ParseVariable.h"
|
||||
#include "data/type/DataType.h"
|
||||
|
||||
ASTVisitor::ASTVisitor(clang::ASTContext* context, std::shared_ptr<ParserClient> client)
|
||||
ASTVisitor::ASTVisitor(clang::ASTContext* context, ParserClient* client)
|
||||
: m_context(context)
|
||||
, m_client(client)
|
||||
{
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef AST_VISITOR_H
|
||||
#define AST_VISITOR_H
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "clang/AST/ASTContext.h"
|
||||
#include "clang/AST/RecursiveASTVisitor.h"
|
||||
|
||||
@@ -14,7 +12,7 @@ class ASTVisitor
|
||||
, public ASTBodyVisitorClient
|
||||
{
|
||||
public:
|
||||
ASTVisitor(clang::ASTContext* context, std::shared_ptr<ParserClient> client);
|
||||
ASTVisitor(clang::ASTContext* context, ParserClient* client);
|
||||
virtual ~ASTVisitor();
|
||||
|
||||
// Left for debugging purposes. Uncomment to see a colored ast-dump of the parsed file.
|
||||
@@ -66,7 +64,7 @@ private:
|
||||
ParseFunction getParseFunction(clang::FunctionDecl* declaration) const;
|
||||
|
||||
clang::ASTContext* m_context;
|
||||
std::shared_ptr<ParserClient> m_client;
|
||||
ParserClient* m_client;
|
||||
};
|
||||
|
||||
#endif // AST_VISITOR_H
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "utility/logging/logging.h"
|
||||
#include "utility/text/TextAccess.h"
|
||||
|
||||
CxxParser::CxxParser(std::shared_ptr<ParserClient> client)
|
||||
CxxParser::CxxParser(ParserClient* client)
|
||||
: Parser(client)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
class CxxParser: public Parser
|
||||
{
|
||||
public:
|
||||
CxxParser(std::shared_ptr<ParserClient> client);
|
||||
CxxParser(ParserClient* client);
|
||||
~CxxParser();
|
||||
|
||||
virtual void parseFiles(const std::vector<std::string>& filePaths);
|
||||
|
||||
Reference in New Issue
Block a user