#include <parserintf.h>
Public Member Functions | |
ParserManager (ParserInterface *defaultParser) | |
void | registerParser (const char *extension, ParserInterface *parser) |
ParserInterface * | getParser (const char *extension) |
This class manages the language parsers in the system. One can register parsers, and obtain a parser given a file extension.
Definition at line 108 of file parserintf.h.
ParserManager::ParserManager | ( | ParserInterface * | defaultParser | ) | [inline] |
Creates the parser manager object.
defaultParser | The default parser that is used when no explicit extension has been registered for a given input file. |
Definition at line 116 of file parserintf.h.
void ParserManager::registerParser | ( | const char * | extension, | |
ParserInterface * | parser | |||
) | [inline] |
Registers an additional parser.
[in] | extension | The file extension that will trigger the use of this parser (e.g. ".py", or ".bas"). |
[in] | parser | The parser that is to be used for the given extension. |
Definition at line 125 of file parserintf.h.
Referenced by initDoxygen().
ParserInterface* ParserManager::getParser | ( | const char * | extension | ) | [inline] |
Gets the interface to the parser associated with given extension. If there is no parser explicitly registered for the supplied extension, the interface to the default parser will be returned.
Definition at line 134 of file parserintf.h.
References QCString.
Referenced by FileDef::parseSource(), XmlDocVisitor::visit(), RTFDocVisitor::visit(), ManDocVisitor::visit(), LatexDocVisitor::visit(), HtmlDocVisitor::visit(), MemberDef::writeDocumentation(), Definition::writeInlineCode(), FileDef::writeSource(), and writeXMLCodeBlock().