PhoenixHPCProxy  0.8.0
Lightweight HPC proxy
Loading...
Searching...
No Matches
HeaderParser.h
Go to the documentation of this file.
1/***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : CeCILL-C
5****************************************/
6
7#ifndef __HEADERPARSER_H__
8#define __HEADERPARSER_H__
9
10#include "PMultiFileParser.h"
12
14class HeaderParser : public PMultiFileParser{
15 public:
17 HeaderParser(const HeaderParser & other);
18 virtual ~HeaderParser();
19 HeaderParser & operator = (const HeaderParser & other);
20
21 const PVecSource & getVecSource() const;
22
23 protected:
24 void copyHeaderParser(const HeaderParser & other);
25
26 virtual bool parseFile();
27 virtual void preLoadFile();
28 virtual void postLoadFile();
29
30 private:
32
34 void playOtherCode();
35
36 bool parseMacro();
37 bool parseDocString();
38 bool parseFunction(PFunction & function);
39 void parseTemplateDef(PString & templateDef);
40 bool parseArgument(PArgument & argument);
41 void parseType(PString & type);
42
46 PString p_otherCode;
51};
52
53
54
55#endif
56
HeaderParser & operator=(const HeaderParser &other)
Definition of equal operator of HeaderParser.
virtual ~HeaderParser()
Destructor of HeaderParser.
virtual bool parseFile()
Parse the input file.
void playOtherCode()
Add the other code parsed into the current PSource.
virtual void preLoadFile()
Initialisation to be done just before loading a file.
virtual void postLoadFile()
Initialisation to be done just after loading a file.
PString p_otherCode
Other code which is not a function prototype.
PString p_lastDocString
Last documentation string.
HeaderParser()
Default constructor of HeaderParser.
PSource p_currentSource
Current source to be parsed.
bool parseMacro()
Parse a macro.
void parseTemplateDef(PString &templateDef)
Parse a template definition.
bool parseArgument(PArgument &argument)
Parse a PAttribute.
PVecSource p_vecSource
Vector of parsed PSource.
bool parseDocString()
Parse a doc string.
void parseType(PString &type)
Parse a data type.
void incrementCurrentChar()
Increment current char position.
const PVecSource & getVecSource() const
Get the parsed vector of PSource.
bool parseFunction(PFunction &function)
Parse a PFunction.
void initialisationHeaderParser()
Initialisation function of the class HeaderParser.
void copyHeaderParser(const HeaderParser &other)
Copy function of HeaderParser.
Parameter of a function.
Definition PRepr.h:14
Function prototype.
Definition PRepr.h:46
Configuration file which will produce a source and header in C++.
Definition PRepr.h:88
std::vector< PSource > PVecSource