Doxygen
Loading...
Searching...
No Matches
DocVisitor Class Reference

Helper base class for functionality shared by all visitors. More...

#include <src/docvisitor.h>

+ Inheritance diagram for DocVisitor:

Classes

struct  Private
 

Public Member Functions

 DocVisitor ()
 
virtual ~DocVisitor ()
 
CodeParserInterfacegetCodeParser (const QCString &langExt)
 
void pushHidden (bool hide)
 
bool popHidden ()
 

Private Attributes

std::unique_ptr< Privatem_p
 

Detailed Description

Helper base class for functionality shared by all visitors.

Definition at line 28 of file docvisitor.h.

Constructor & Destructor Documentation

◆ DocVisitor()

DocVisitor::DocVisitor ( )

Definition at line 32 of file docvisitor.cpp.

32 : m_p(std::make_unique<Private>())
33{
34}
std::unique_ptr< Private > m_p
Definition docvisitor.h:31

References m_p.

◆ ~DocVisitor()

DocVisitor::~DocVisitor ( )
virtual

Definition at line 36 of file docvisitor.cpp.

37{
38}

Member Function Documentation

◆ getCodeParser()

CodeParserInterface & DocVisitor::getCodeParser ( const QCString & langExt)

Definition at line 40 of file docvisitor.cpp.

41{
42 std::string ext = extension.str();
43 // for each extension we create a code parser once per visitor, so that
44 // the context of the same parser object is reused throughout multiple passes for instance
45 // for code fragments shown via dontinclude.
46 auto it = m_p->parserFactoryMap.find(ext);
47 if (it==m_p->parserFactoryMap.end())
48 {
49 auto factory = Doxygen::parserManager->getCodeParserFactory(extension);
50 auto result = m_p->parserFactoryMap.emplace(ext,factory());
51 it = result.first;
52 }
53 return *it->second.get();
54}
static ParserManager * parserManager
Definition doxygen.h:131
CodeParserFactory & getCodeParserFactory(const QCString &extension)
Get the factory for create code parser objects with a given extension.
Definition parserintf.h:225

References m_p, Doxygen::parserManager, and QCString::str().

Referenced by DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), ManDocVisitor::operator()(), ManDocVisitor::operator()(), ManDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), and XmlDocVisitor::operator()().

◆ popHidden()

bool DocVisitor::popHidden ( )

Definition at line 61 of file docvisitor.cpp.

62{
63 if (m_p->hidden.empty()) return false;
64 bool v = m_p->hidden.top();
65 m_p->hidden.pop();
66 return v;
67}

References m_p.

Referenced by RTFDocVisitor::includePicturePostRTF(), DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), LatexDocVisitor::operator()(), ManDocVisitor::operator()(), RTFDocVisitor::operator()(), and XmlDocVisitor::operator()().

◆ pushHidden()

Member Data Documentation

◆ m_p

std::unique_ptr<Private> DocVisitor::m_p
private

Definition at line 31 of file docvisitor.h.

Referenced by DocVisitor(), getCodeParser(), popHidden(), and pushHidden().


The documentation for this class was generated from the following files: