summaryrefslogtreecommitdiffstats
path: root/src/docbookvisitor.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-09-27 18:26:20 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-09-27 18:26:20 (GMT)
commitcfdabb54c5bcea38629eb0ec8f207d1306ff0939 (patch)
treecb323c258fe80e0e2422f939d40af66eefdd055e /src/docbookvisitor.cpp
parent55e15c86717f38c9b510e4287cb0b4f165b8cb10 (diff)
downloadDoxygen-cfdabb54c5bcea38629eb0ec8f207d1306ff0939.zip
Doxygen-cfdabb54c5bcea38629eb0ec8f207d1306ff0939.tar.gz
Doxygen-cfdabb54c5bcea38629eb0ec8f207d1306ff0939.tar.bz2
Refactoring: prepare output generators for multi-threaded use
Diffstat (limited to 'src/docbookvisitor.cpp')
-rw-r--r--src/docbookvisitor.cpp69
1 files changed, 33 insertions, 36 deletions
diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp
index 78af6e0..bf6c827 100644
--- a/src/docbookvisitor.cpp
+++ b/src/docbookvisitor.cpp
@@ -316,9 +316,11 @@ DB_VIS_C
{
case DocVerbatim::Code: // fall though
m_t << "<literallayout><computeroutput>";
- Doxygen::parserManager->getCodeParser(m_langExt)
- .parseCode(m_ci,s->context(),s->text(),langExt,
- s->isExample(),s->exampleFile());
+ getCodeParser(m_langExt).parseCode(m_ci,s->context(),
+ s->text(),
+ langExt,
+ s->isExample(),
+ s->exampleFile());
m_t << "</computeroutput></literallayout>";
break;
case DocVerbatim::Verbatim:
@@ -425,24 +427,22 @@ DB_VIS_C
m_t << "<literallayout><computeroutput>";
QFileInfo cfi( inc->file() );
FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
- Doxygen::parserManager->getCodeParser(inc->extension())
- .parseCode(m_ci,inc->context(),
- inc->text(),
- langExt,
- inc->isExample(),
- inc->exampleFile(), fd);
+ getCodeParser(inc->extension()).parseCode(m_ci,inc->context(),
+ inc->text(),
+ langExt,
+ inc->isExample(),
+ inc->exampleFile(), fd);
delete fd;
m_t << "</computeroutput></literallayout>";
}
break;
case DocInclude::Include:
m_t << "<literallayout><computeroutput>";
- Doxygen::parserManager->getCodeParser(inc->extension())
- .parseCode(m_ci,inc->context(),
- inc->text(),
- langExt,
- inc->isExample(),
- inc->exampleFile());
+ getCodeParser(inc->extension()).parseCode(m_ci,inc->context(),
+ inc->text(),
+ langExt,
+ inc->isExample(),
+ inc->exampleFile());
m_t << "</computeroutput></literallayout>";
break;
case DocInclude::DontInclude:
@@ -463,14 +463,13 @@ DB_VIS_C
break;
case DocInclude::Snippet:
m_t << "<literallayout><computeroutput>";
- Doxygen::parserManager->getCodeParser(inc->extension())
- .parseCode(m_ci,
- inc->context(),
- extractBlock(inc->text(),inc->blockId()),
- langExt,
- inc->isExample(),
- inc->exampleFile()
- );
+ getCodeParser(inc->extension()).parseCode(m_ci,
+ inc->context(),
+ extractBlock(inc->text(),inc->blockId()),
+ langExt,
+ inc->isExample(),
+ inc->exampleFile()
+ );
m_t << "</computeroutput></literallayout>";
break;
case DocInclude::SnipWithLines:
@@ -478,8 +477,7 @@ DB_VIS_C
QFileInfo cfi( inc->file() );
FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
m_t << "<literallayout><computeroutput>";
- Doxygen::parserManager->getCodeParser(inc->extension())
- .parseCode(m_ci,
+ getCodeParser(inc->extension()).parseCode(m_ci,
inc->context(),
extractBlock(inc->text(),inc->blockId()),
langExt,
@@ -531,17 +529,16 @@ DB_VIS_C
fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
}
- Doxygen::parserManager->getCodeParser(locLangExt)
- .parseCode(m_ci,op->context(),
- op->text(),langExt,op->isExample(),
- op->exampleFile(),
- fd, // fileDef
- op->line(), // startLine
- -1, // endLine
- FALSE, // inline fragment
- 0, // memberDef
- op->showLineNo() // show line numbers
- );
+ getCodeParser(locLangExt).parseCode(m_ci,op->context(),
+ op->text(),langExt,op->isExample(),
+ op->exampleFile(),
+ fd, // fileDef
+ op->line(), // startLine
+ -1, // endLine
+ FALSE, // inline fragment
+ 0, // memberDef
+ op->showLineNo() // show line numbers
+ );
if (fd) delete fd;
}
pushEnabled();