![]() |
PhoenixHPCProxy
0.8.0
Lightweight HPC proxy
|
Parse the configuration a create the vector of sources. More...
#include <HeaderParser.h>
Public Member Functions | |
const PVecSource & | getVecSource () const |
Get the parsed vector of PSource. | |
HeaderParser () | |
Default constructor of HeaderParser. | |
HeaderParser (const HeaderParser &other) | |
Copy constructor of HeaderParser. | |
HeaderParser & | operator= (const HeaderParser &other) |
Definition of equal operator of HeaderParser. | |
virtual | ~HeaderParser () |
Destructor of HeaderParser. | |
Protected Member Functions | |
void | copyHeaderParser (const HeaderParser &other) |
Copy function of HeaderParser. | |
virtual bool | parseFile () |
Parse the input file. | |
virtual void | postLoadFile () |
Initialisation to be done just after loading a file. | |
virtual void | preLoadFile () |
Initialisation to be done just before loading a file. | |
Private Member Functions | |
void | incrementCurrentChar () |
Increment current char position. | |
void | initialisationHeaderParser () |
Initialisation function of the class HeaderParser. | |
bool | parseArgument (PArgument &argument) |
Parse a PAttribute. | |
bool | parseDocString () |
Parse a doc string. | |
bool | parseFunction (PFunction &function) |
Parse a PFunction. | |
bool | parseMacro () |
Parse a macro. | |
void | parseTemplateDef (PString &templateDef) |
Parse a template definition. | |
void | parseType (PString &type) |
Parse a data type. | |
void | playOtherCode () |
Add the other code parsed into the current PSource. | |
Private Attributes | |
PSource | p_currentSource |
Current source to be parsed. | |
PString | p_lastDocString |
Last documentation string. | |
PString | p_otherCode |
Other code which is not a function prototype. | |
PVecSource | p_vecSource |
Vector of parsed PSource. | |
Parse the configuration a create the vector of sources.
Definition at line 14 of file HeaderParser.h.
HeaderParser::HeaderParser | ( | ) |
Default constructor of HeaderParser.
Definition at line 10 of file HeaderParser.cpp.
References initialisationHeaderParser().
Referenced by copyHeaderParser(), HeaderParser(), and operator=().
HeaderParser::HeaderParser | ( | const HeaderParser & | other | ) |
Copy constructor of HeaderParser.
other | : class to copy |
Definition at line 17 of file HeaderParser.cpp.
References copyHeaderParser(), and HeaderParser().
|
virtual |
|
protected |
Copy function of HeaderParser.
other | : class to copy |
Definition at line 45 of file HeaderParser.cpp.
References HeaderParser(), and p_vecSource.
Referenced by HeaderParser(), and operator=().
const PVecSource & HeaderParser::getVecSource | ( | ) | const |
Get the parsed vector of PSource.
Definition at line 38 of file HeaderParser.cpp.
References p_vecSource.
Referenced by createSourceFromConfig().
|
private |
Increment current char position.
[out] | textObj | : obh to be used to store text |
Definition at line 96 of file HeaderParser.cpp.
References p_otherCode.
Referenced by parseFile().
|
private |
Initialisation function of the class HeaderParser.
Definition at line 89 of file HeaderParser.cpp.
Referenced by HeaderParser().
HeaderParser & HeaderParser::operator= | ( | const HeaderParser & | other | ) |
Definition of equal operator of HeaderParser.
other | : class to copy |
Definition at line 30 of file HeaderParser.cpp.
References copyHeaderParser(), and HeaderParser().
|
private |
Parse a PAttribute.
[out] | arg | : PArgument to be parsed |
Definition at line 223 of file HeaderParser.cpp.
References isPtrRef(), parseType(), PArgument::setDefaultValue(), PArgument::setName(), PArgument::setPtrRef(), and PArgument::setType().
Referenced by parseFunction().
|
private |
Parse a doc string.
Definition at line 129 of file HeaderParser.cpp.
References p_lastDocString.
Referenced by parseFile(), and parseFunction().
|
protectedvirtual |
Parse the input file.
Definition at line 52 of file HeaderParser.cpp.
References incrementCurrentChar(), p_currentSource, p_lastDocString, p_otherCode, p_vecSource, parseDocString(), parseFunction(), and parseMacro().
|
private |
Parse a PFunction.
[out] | function | : PFunction to be parsed |
Definition at line 140 of file HeaderParser.cpp.
References PFunction::getVecArgument(), p_lastDocString, parseArgument(), parseDocString(), parseTemplateDef(), parseType(), playOtherCode(), PFunction::setDocString(), PFunction::setName(), and PFunction::setOutputType().
Referenced by parseFile().
|
private |
Parse a macro.
Definition at line 117 of file HeaderParser.cpp.
References p_currentSource, and PFunction::setOtherCode().
Referenced by parseFile().
|
private |
Parse a template definition.
[out] | templateDef | : template definition |
Definition at line 187 of file HeaderParser.cpp.
Referenced by parseFunction().
|
private |
Parse a data type.
[out] | type | : type to be parsed |
Definition at line 269 of file HeaderParser.cpp.
Referenced by parseArgument(), and parseFunction().
|
private |
Add the other code parsed into the current PSource.
Definition at line 105 of file HeaderParser.cpp.
References p_currentSource, p_otherCode, and PFunction::setOtherCode().
Referenced by parseFunction().
|
protectedvirtual |
Initialisation to be done just after loading a file.
Definition at line 84 of file HeaderParser.cpp.
|
protectedvirtual |
Initialisation to be done just before loading a file.
Definition at line 77 of file HeaderParser.cpp.
|
private |
Current source to be parsed.
Definition at line 48 of file HeaderParser.h.
Referenced by parseFile(), parseMacro(), and playOtherCode().
|
private |
Last documentation string.
Definition at line 44 of file HeaderParser.h.
Referenced by parseDocString(), parseFile(), and parseFunction().
|
private |
Other code which is not a function prototype.
Definition at line 46 of file HeaderParser.h.
Referenced by incrementCurrentChar(), parseFile(), and playOtherCode().
|
private |
Vector of parsed PSource.
Definition at line 50 of file HeaderParser.h.
Referenced by copyHeaderParser(), getVecSource(), and parseFile().