diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-09-27 18:26:20 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-09-27 18:26:20 (GMT) |
commit | cfdabb54c5bcea38629eb0ec8f207d1306ff0939 (patch) | |
tree | cb323c258fe80e0e2422f939d40af66eefdd055e /addon | |
parent | 55e15c86717f38c9b510e4287cb0b4f165b8cb10 (diff) | |
download | Doxygen-cfdabb54c5bcea38629eb0ec8f207d1306ff0939.zip Doxygen-cfdabb54c5bcea38629eb0ec8f207d1306ff0939.tar.gz Doxygen-cfdabb54c5bcea38629eb0ec8f207d1306ff0939.tar.bz2 |
Refactoring: prepare output generators for multi-threaded use
Diffstat (limited to 'addon')
-rw-r--r-- | addon/doxyapp/doxyapp.cpp | 8 | ||||
-rw-r--r-- | addon/doxyparse/doxyparse.cpp | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/addon/doxyapp/doxyapp.cpp b/addon/doxyapp/doxyapp.cpp index 97f3755..3846ed7 100644 --- a/addon/doxyapp/doxyapp.cpp +++ b/addon/doxyapp/doxyapp.cpp @@ -62,6 +62,8 @@ class XRefDummyCodeGenerator : public CodeOutputInterface void writeCodeAnchor(const char *) {} void setCurrentDoc(const Definition *,const char *,bool) {} void addWord(const char *,bool) {} + void startCodeFragment(const char *) {} + void endCodeFragment() {} // here we are presented with the symbols found by the code parser void linkableSymbol(int l, const char *sym,Definition *symDef,Definition *context) @@ -109,19 +111,19 @@ class XRefDummyCodeGenerator : public CodeOutputInterface static void findXRefSymbols(FileDef *fd) { // get the interface to a parser that matches the file extension - CodeParserInterface &intf=Doxygen::parserManager->getCodeParser(fd->getDefFileExtension()); + auto intf=Doxygen::parserManager->getCodeParser(fd->getDefFileExtension()); // get the programming language from the file name SrcLangExt lang = getLanguageFromFileName(fd->name()); // reset the parsers state - intf.resetCodeParserState(); + intf->resetCodeParserState(); // create a new backend object XRefDummyCodeGenerator *xrefGen = new XRefDummyCodeGenerator(fd); // parse the source code - intf.parseCode(*xrefGen, + intf->parseCode(*xrefGen, 0, fileToString(fd->absFilePath()), lang, diff --git a/addon/doxyparse/doxyparse.cpp b/addon/doxyparse/doxyparse.cpp index c06eb1c..2032d06 100644 --- a/addon/doxyparse/doxyparse.cpp +++ b/addon/doxyparse/doxyparse.cpp @@ -70,6 +70,8 @@ class Doxyparse : public CodeOutputInterface void startCodeLine(bool) {} void setCurrentDoc(const Definition *,const char *,bool) {} void addWord(const char *,bool) {} + void startCodeFragment(const char *) {} + void endCodeFragment() {} void linkableSymbol(int l, const char *sym, Definition *symDef, Definition *context) { @@ -90,19 +92,19 @@ static bool is_c_code = true; static void findXRefSymbols(FileDef *fd) { // get the interface to a parser that matches the file extension - CodeParserInterface &intf=Doxygen::parserManager->getCodeParser(fd->getDefFileExtension()); + auto intf=Doxygen::parserManager->getCodeParser(fd->getDefFileExtension()); // get the programming language from the file name SrcLangExt lang = getLanguageFromFileName(fd->name()); // reset the parsers state - intf.resetCodeParserState(); + intf->resetCodeParserState(); // create a new backend object Doxyparse *parse = new Doxyparse(fd); // parse the source code - intf.parseCode(*parse, 0, fileToString(fd->absFilePath()), lang, FALSE, 0, fd); + intf->parseCode(*parse, 0, fileToString(fd->absFilePath()), lang, FALSE, 0, fd); // dismiss the object. delete parse; |