doxygen
|
Manages programming language parsers. More...
#include <parserintf.h>
Public Member Functions | |
ParserManager (OutlineParserFactory outlineParserFactory, CodeParserFactory codeParserFactory) | |
Create the parser manager. More... | |
void | registerParser (const QCString &name, OutlineParserFactory outlineParserFactory, CodeParserFactory codeParserFactory) |
Registers an additional parser. More... | |
bool | registerExtension (const QCString &extension, const QCString &parserName) |
Registers a file extension with a parser with name parserName. More... | |
std::unique_ptr< OutlineParserInterface > | getOutlineParser (const QCString &extension) |
Gets the interface to the parser associated with a given extension. More... | |
std::unique_ptr< CodeParserInterface > | getCodeParser (const QCString &extension) |
Gets the interface to the parser associated with a given extension. More... | |
CodeParserFactory & | getCodeParserFactory (const QCString &extension) |
Get the factory for create code parser objects with a given extension. More... | |
QCString | getParserName (const QCString &extension) |
Gets the name of the parser associated with given extension. More... | |
Manages programming language parsers.
This class manages the language parsers in the system. One can register parsers, and obtain a parser given a file extension.
|
inline |
Create the parser manager.
outlineParserFactory | the fallback outline parser factory to use for unknown extensions |
codeParserFactory | the fallback code parser factory to use for unknown extensions |
|
inline |
Gets the interface to the parser associated with a given extension.
If there is no parser explicitly registered for the supplied extension, the interface to the default parser will be returned.
|
inline |
Get the factory for create code parser objects with a given extension.
|
inline |
Gets the interface to the parser associated with a given extension.
If there is no parser explicitly registered for the supplied extension, the interface to the default parser will be returned.
Gets the name of the parser associated with given extension.
If there is no parser explicitly registered for the supplied extension, te empty string will be reurned.
|
inline |
Registers a file extension with a parser with name parserName.
Returns TRUE if the extension was successfully registered.
|
inline |
Registers an additional parser.
[in] | name | A symbolic name of the parser, i.e. "c", "python", "fortran", "vhdl", ... |
[in] | outlineParserFactory | A factory method to create a language parser (scanner) that is to be used for the given name. |
[in] | codeParserFactory | A factory method to create a code parser that is to be used for the given name. |