#ifndef CXX_PARSER_H #define CXX_PARSER_H #include "data/parser/Parser.h" namespace clang { namespace tooling { class FixedCompilationDatabase; } } class CxxDiagnosticConsumer; class FileManager; class FileRegister; class TaskParseCxx; class CxxParser: public Parser { public: CxxParser(ParserClient* client, const FileManager* fileManager); ~CxxParser(); // ParserClient implementation virtual void parseFiles(const std::vector& filePaths, const Arguments& arguments); virtual void parseFile(const FilePath& filePath, std::shared_ptr textAccess, const Arguments& arguments); private: std::vector getCommandlineArguments(const Arguments& arguments) const; std::shared_ptr getCompilationDatabase(const Arguments& arguments) const; std::shared_ptr getDiagnostics(const Arguments& arguments) const; // Accessed by TaskParseCxx void setupParsing(const std::vector& filePaths, const Arguments& arguments); void runTool(const std::vector& files); FileRegister* getFileRegister(); ParserClient* getParserClient(); friend class TaskParseCxx; std::shared_ptr m_fileRegister; std::shared_ptr m_compilationDatabase; std::shared_ptr m_diagnostics; }; #endif // CXX_PARSER_H