doxygen
Public Member Functions | List of all members
ParserManager Class Reference

Manages programming language parsers. More...

#include <parserintf.h>

Public Member Functions

 ParserManager ()
 Creates the parser manager object.
 
void registerDefaultParser (ParserInterface *parser)
 
void registerParser (const char *name, ParserInterface *parser)
 Registers an additional parser. More...
 
bool registerExtension (const char *extension, const char *parserName)
 Registers a file extension with a parser with name parserName. More...
 
ParserInterfacegetParser (const char *extension)
 Gets the interface to the parser associated with given extension. More...
 

Detailed Description

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.

Member Function Documentation

§ getParser()

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.

§ registerExtension()

bool ParserManager::registerExtension ( const char *  extension,
const char *  parserName 
)
inline

Registers a file extension with a parser with name parserName.

Returns TRUE if the extension was successfully registered.

§ registerParser()

void ParserManager::registerParser ( const char *  name,
ParserInterface parser 
)
inline

Registers an additional parser.

Parameters
[in]nameA symbolic name of the parser, i.e. "c", "python", "fortran", "vhdl", ...
[in]parserThe parser that is to be used for the given name.

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