diff options
Diffstat (limited to 'src/docbookgen.cpp')
-rw-r--r-- | src/docbookgen.cpp | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/docbookgen.cpp b/src/docbookgen.cpp index ff85689..ac502a2 100644 --- a/src/docbookgen.cpp +++ b/src/docbookgen.cpp @@ -147,8 +147,6 @@ DocbookCodeGenerator::DocbookCodeGenerator(TextStream &t) : m_t(t) { } -DocbookCodeGenerator::~DocbookCodeGenerator() {} - void DocbookCodeGenerator::codify(const QCString &text) { Docbook_DB(("(codify \"%s\")\n",text)); @@ -253,14 +251,6 @@ void DocbookCodeGenerator::writeLineNumber(const QCString &ref,const QCString &f m_col=0; } -void DocbookCodeGenerator::setCurrentDoc(const Definition *,const QCString &,bool) -{ -} - -void DocbookCodeGenerator::addWord(const QCString &,bool) -{ -} - void DocbookCodeGenerator::finish() { endCodeLine(); @@ -633,13 +623,15 @@ DB_GEN_C } } -void DocbookGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef *,int) +void DocbookGenerator::writeDoc(const IDocNodeAST *ast,const Definition *ctx,const MemberDef *,int) { DB_GEN_C - DocbookDocVisitor *visitor = - new DocbookDocVisitor(m_t,*this,ctx?ctx->getDefFileExtension():QCString()); - n->accept(visitor); - delete visitor; + auto astImpl = dynamic_cast<const DocNodeAST*>(ast); + if (astImpl) + { + auto visitor { DocbookDocVisitor(m_t,*this,ctx?ctx->getDefFileExtension():QCString()) }; + std::visit(visitor,astImpl->root); + } } void DocbookGenerator::startParagraph(const QCString &) |