56 const std::shared_ptr<
Entry> &root,
114 bool stripCodeComments,
117 const
FileDef *fileDef=
nullptr,
120 bool inlineFragment=
FALSE,
122 bool showLineNumbers=
TRUE,
124 bool collectXRefs=
TRUE
193 const auto &parserIt =
m_parsers.find(parserName.
str());
211 return getParsers(extension).outlineParserFactory();
227 return getParsers(extension).codeParserFactory;
243 if (ext.
isEmpty()) ext=
".no_extension";
Clang parser object for a single translation unit, which consists of a source file and the directly o...
Abstract interface for code parsers.
virtual void parseCode(OutputCodeList &codeOutList, const QCString &scopeName, const QCString &input, SrcLangExt lang, bool stripCodeComments, bool isExampleBlock, const QCString &exampleName=QCString(), const FileDef *fileDef=nullptr, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, const MemberDef *memberDef=nullptr, bool showLineNumbers=TRUE, const Definition *searchCtx=nullptr, bool collectXRefs=TRUE)=0
Parses a source file or fragment with the goal to produce highlighted and cross-referenced output.
virtual void resetCodeParserState()=0
Resets the state of the code parser.
The common base class of all entity definitions found in the sources.
Represents an unstructured piece of information, about an entity found in the sources.
A model of a file symbol.
A model of a class/file/namespace member symbol.
Abstract interface for outline parsers.
virtual bool needsPreprocessing(const QCString &extension) const =0
Returns TRUE if the language identified by extension needs the C preprocessor to be run before feed t...
virtual void parseInput(const QCString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &root, ClangTUParser *clangParser)=0
Parses a single input file with the goal to build an Entry tree.
virtual void parsePrototype(const QCString &text)=0
Callback function called by the comment block scanner.
Class representing a list of different code generators.
bool registerExtension(const QCString &extension, const QCString &parserName)
Registers a file extension with a parser with name parserName.
std::map< std::string, ParserPair > m_parsers
void registerParser(const QCString &name, const OutlineParserFactory &outlineParserFactory, const CodeParserFactory &codeParserFactory)
Registers an additional parser.
std::unique_ptr< OutlineParserInterface > getOutlineParser(const QCString &extension)
Gets the interface to the parser associated with a given extension.
ParserPair m_defaultParsers
std::unique_ptr< CodeParserInterface > getCodeParser(const QCString &extension)
Gets the interface to the parser associated with a given extension.
CodeParserFactory & getCodeParserFactory(const QCString &extension)
Get the factory for create code parser objects with a given extension.
ParserManager(const OutlineParserFactory &outlineParserFactory, const CodeParserFactory &codeParserFactory)
Create the parser manager.
ParserPair & getParsers(const QCString &extension)
std::map< std::string, ParserPair & > m_extensions
QCString getParserName(const QCString &extension)
Gets the name of the parser associated with given extension.
This is an alternative implementation of QCString.
size_t length() const
Returns the length of the string, not counting the 0-terminator.
bool isEmpty() const
Returns TRUE iff the string is empty.
const std::string & str() const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
QCString left(size_t len) const
#define ABSTRACT_BASE_CLASS(cls)
Macro to implement rule of 5 for an abstract base class.
std::function< std::unique_ptr< CodeParserInterface >()> CodeParserFactory
std::function< std::unique_ptr< OutlineParserInterface >()> OutlineParserFactory
CodeParserFactory codeParserFactory
ParserPair(OutlineParserFactory opf, const CodeParserFactory &cpf, const QCString &pn)
OutlineParserFactory outlineParserFactory
This file contains a number of basic enums and types.
SrcLangExt
Language as given by extension.