diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-07-15 19:23:12 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-07-16 06:27:29 (GMT) |
commit | 50fdb591d4abfdf88bfdda96ffd832cc4c024963 (patch) | |
tree | 85ad9b591eb36ad73cc07f4fb91ddcfb6d5762cf /src/parserintf.h | |
parent | 93dc8f81eaaf5523715a4d5867cbb55f46c3f647 (diff) | |
download | Doxygen-50fdb591d4abfdf88bfdda96ffd832cc4c024963.zip Doxygen-50fdb591d4abfdf88bfdda96ffd832cc4c024963.tar.gz Doxygen-50fdb591d4abfdf88bfdda96ffd832cc4c024963.tar.bz2 |
Refactor: Modernize clang parser and make it run with multiple threads
Diffstat (limited to 'src/parserintf.h')
-rw-r--r-- | src/parserintf.h | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/src/parserintf.h b/src/parserintf.h index f11352e..911b707 100644 --- a/src/parserintf.h +++ b/src/parserintf.h @@ -26,12 +26,14 @@ #include <string> #include "types.h" +#include "containers.h" class Entry; class FileDef; class CodeOutputInterface; class MemberDef; class Definition; +class ClangTUParser; /** \brief Abstract interface for outline parsers. * @@ -44,36 +46,18 @@ class OutlineParserInterface public: virtual ~OutlineParserInterface() {} - /** Starts processing a translation unit (source files + headers). - * After this call parseInput() is called with sameTranslationUnit - * set to FALSE. If parseInput() returns additional include files, - * these are also processed using parseInput() with - * sameTranslationUnit set to TRUE. After that - * finishTranslationUnit() is called. - */ - virtual void startTranslationUnit(const char *fileName) = 0; - - /** Called after all files in a translation unit have been - * processed. - */ - virtual void finishTranslationUnit() = 0; - /** Parses a single input file with the goal to build an Entry tree. * @param[in] fileName The full name of the file. * @param[in] fileBuf The contents of the file (zero terminated). * @param[in,out] root The root of the tree of Entry *nodes * representing the information extracted from the file. - * @param[in] sameTranslationUnit TRUE if this file was found in the same - * translation unit (in the filesInSameTranslationUnit list - * returned for another file). - * @param[in,out] filesInSameTranslationUnit other files expected to be - * found in the same translation unit (used for libclang) + * @param[in] clangParser The clang translation unit parser object + * or nullptr if disabled. */ virtual void parseInput(const char *fileName, const char *fileBuf, const std::shared_ptr<Entry> &root, - bool sameTranslationUnit, - QStrList &filesInSameTranslationUnit) = 0; + ClangTUParser *clangParser) = 0; /** Returns TRUE if the language identified by \a extension needs * the C preprocessor to be run before feed the result to the input |