EvEmu
0.8.4
11 September 2021
|
#include "HeaderGenerator.h"
Public Member Functions | |
ClassHeaderGenerator (FILE *outputFile=NULL) | |
![]() | |
Generator (FILE *outputFile=NULL) | |
Primary constructor. More... | |
void | SetOutputFile (FILE *outputFile) |
Sets output file. More... | |
![]() | |
template<typename T > | |
void | AddMemberParser (const char *name, T &instance, bool(T::*method)(const TiXmlElement *)) |
Adds a member parser. More... | |
template<typename T > | |
void | AddValueParser (const char *name, T &value) |
Adds a value parser. More... | |
![]() | |
XMLParser () | |
Primary constructor. More... | |
virtual | ~XMLParser () |
A destructor. More... | |
bool | ParseFile (const char *file) |
Parses file using registered parsers. More... | |
bool | ParseElement (const TiXmlElement *element) const |
Parses element using registered parsers. More... | |
bool | ParseElementChildren (const TiXmlElement *element, size_t max=0) const |
Parses element's children using registered parsers. More... | |
void | AddParser (const char *name, ElementParser *parser) |
Adds a parser. More... | |
void | RemoveParser (const char *name) |
Removes a parser. More... | |
void | ClearParsers () |
Clears all parsers. More... | |
Protected Member Functions | |
bool | RegisterName (const char *name, uint32 row) |
void | ClearNames () |
void | RegisterProcessors () |
bool | ProcessElementDef (const TiXmlElement *field) |
bool | ProcessElement (const TiXmlElement *field) |
bool | ProcessElementPtr (const TiXmlElement *field) |
bool | ProcessRaw (const TiXmlElement *field) |
bool | ProcessInt (const TiXmlElement *field) |
bool | ProcessLong (const TiXmlElement *field) |
bool | ProcessReal (const TiXmlElement *field) |
bool | ProcessBool (const TiXmlElement *field) |
bool | ProcessNone (const TiXmlElement *field) |
bool | ProcessBuffer (const TiXmlElement *field) |
bool | ProcessString (const TiXmlElement *field) |
bool | ProcessStringInline (const TiXmlElement *field) |
bool | ProcessWString (const TiXmlElement *field) |
bool | ProcessWStringInline (const TiXmlElement *field) |
bool | ProcessToken (const TiXmlElement *field) |
bool | ProcessTokenInline (const TiXmlElement *field) |
bool | ProcessObject (const TiXmlElement *field) |
bool | ProcessObjectInline (const TiXmlElement *field) |
bool | ProcessObjectEx (const TiXmlElement *field) |
bool | ProcessTuple (const TiXmlElement *field) |
bool | ProcessTupleInline (const TiXmlElement *field) |
bool | ProcessList (const TiXmlElement *field) |
bool | ProcessListInline (const TiXmlElement *field) |
bool | ProcessListInt (const TiXmlElement *field) |
bool | ProcessListLong (const TiXmlElement *field) |
bool | ProcessListStr (const TiXmlElement *field) |
bool | ProcessDict (const TiXmlElement *field) |
bool | ProcessDictInline (const TiXmlElement *field) |
bool | ProcessDictInlineEntry (const TiXmlElement *field) |
bool | ProcessDictRaw (const TiXmlElement *field) |
bool | ProcessDictInt (const TiXmlElement *field) |
bool | ProcessDictStr (const TiXmlElement *field) |
bool | ProcessSubStreamInline (const TiXmlElement *field) |
bool | ProcessSubStructInline (const TiXmlElement *field) |
![]() | |
void | RegisterProcessors () |
![]() | |
template<typename T > | |
void | AddMemberParser (const char *name, bool(T::*method)(const TiXmlElement *)) |
Adds a member parser, assuming that instance is this. More... | |
Private Attributes | |
std::set< std::string > | mNamesUsed |
Additional Inherited Members | |
![]() | |
std::unique_ptr< TiXmlDocument > | m_pXML_Document |
![]() | |
static const char * | GetEncodeType (const TiXmlElement *element) |
Obtains encode type of given element. More... | |
![]() | |
FILE * | mOutputFile |
Definition at line 31 of file HeaderGenerator.h.
ClassHeaderGenerator::ClassHeaderGenerator | ( | FILE * | outputFile = NULL | ) |
Definition at line 31 of file HeaderGenerator.cpp.
References RegisterProcessors().
|
protected |
Definition at line 50 of file HeaderGenerator.cpp.
References mNamesUsed.
Referenced by ProcessElementDef().
|
protectedvirtual |
Implements Generator.
Definition at line 243 of file HeaderGenerator.cpp.
References Generator::mOutputFile, and RegisterName().
|
protectedvirtual |
Implements Generator.
Definition at line 267 of file HeaderGenerator.cpp.
References Generator::mOutputFile, and RegisterName().
|
protectedvirtual |
Implements Generator.
Definition at line 508 of file HeaderGenerator.cpp.
References Generator::mOutputFile, and RegisterName().
|
protectedvirtual |
Implements Generator.
Definition at line 527 of file HeaderGenerator.cpp.
References XMLParser::ParseElementChildren().
|
protected |
Definition at line 532 of file HeaderGenerator.cpp.
References key(), and XMLParser::ParseElementChildren().
Referenced by RegisterProcessors().
|
protectedvirtual |
Implements Generator.
Definition at line 584 of file HeaderGenerator.cpp.
References Generator::mOutputFile, and RegisterName().
|
protectedvirtual |
Implements Generator.
Definition at line 544 of file HeaderGenerator.cpp.
References key(), Generator::mOutputFile, and RegisterName().
|
protectedvirtual |
Implements Generator.
Definition at line 603 of file HeaderGenerator.cpp.
References Generator::mOutputFile, and RegisterName().
|
protectedvirtual |
Implements Generator.
Definition at line 119 of file HeaderGenerator.cpp.
References Generator::mOutputFile, and RegisterName().
|
protectedvirtual |
Implements Generator.
Definition at line 62 of file HeaderGenerator.cpp.
References ClearNames(), Generator::GetEncodeType(), main(), Generator::mOutputFile, and XMLParser::ParseElement().
|
protectedvirtual |
Implements Generator.
Definition at line 143 of file HeaderGenerator.cpp.
References Generator::mOutputFile, and RegisterName().
|
protectedvirtual |
Implements Generator.
Definition at line 186 of file HeaderGenerator.cpp.
References Generator::mOutputFile, and RegisterName().
|
protectedvirtual |
Implements Generator.
Definition at line 427 of file HeaderGenerator.cpp.
References Generator::mOutputFile, and RegisterName().
|
protectedvirtual |
Implements Generator.
Definition at line 446 of file HeaderGenerator.cpp.
References XMLParser::ParseElementChildren().
|
protectedvirtual |
Implements Generator.
Definition at line 451 of file HeaderGenerator.cpp.
References Generator::mOutputFile, and RegisterName().
|
protectedvirtual |
Implements Generator.
Definition at line 470 of file HeaderGenerator.cpp.
References Generator::mOutputFile, and RegisterName().
|
protectedvirtual |
Implements Generator.
Definition at line 489 of file HeaderGenerator.cpp.
References Generator::mOutputFile, and RegisterName().
|
protectedvirtual |
Implements Generator.
Definition at line 205 of file HeaderGenerator.cpp.
References Generator::mOutputFile, and RegisterName().
|
protectedvirtual |
Implements Generator.
Definition at line 262 of file HeaderGenerator.cpp.
|
protectedvirtual |
Implements Generator.
Definition at line 358 of file HeaderGenerator.cpp.
References Generator::mOutputFile.
|
protectedvirtual |
Implements Generator.
Definition at line 379 of file HeaderGenerator.cpp.
References Generator::mOutputFile, and RegisterName().
|
protectedvirtual |
Implements Generator.
Definition at line 374 of file HeaderGenerator.cpp.
References XMLParser::ParseElementChildren().
|
protectedvirtual |
Implements Generator.
Definition at line 167 of file HeaderGenerator.cpp.
References Generator::mOutputFile, and RegisterName().
|
protectedvirtual |
Implements Generator.
Definition at line 224 of file HeaderGenerator.cpp.
References Generator::mOutputFile, and RegisterName().
|
protectedvirtual |
Implements Generator.
Definition at line 286 of file HeaderGenerator.cpp.
References Generator::mOutputFile, and RegisterName().
|
protectedvirtual |
Implements Generator.
Definition at line 305 of file HeaderGenerator.cpp.
|
protectedvirtual |
Implements Generator.
Definition at line 622 of file HeaderGenerator.cpp.
References XMLParser::ParseElementChildren().
|
protectedvirtual |
Implements Generator.
Definition at line 627 of file HeaderGenerator.cpp.
References XMLParser::ParseElementChildren().
|
protectedvirtual |
Implements Generator.
Definition at line 334 of file HeaderGenerator.cpp.
References Generator::mOutputFile, and RegisterName().
|
protectedvirtual |
Implements Generator.
Definition at line 353 of file HeaderGenerator.cpp.
|
protectedvirtual |
Implements Generator.
Definition at line 403 of file HeaderGenerator.cpp.
References Generator::mOutputFile, and RegisterName().
|
protectedvirtual |
Implements Generator.
Definition at line 422 of file HeaderGenerator.cpp.
References XMLParser::ParseElementChildren().
|
protectedvirtual |
Implements Generator.
Definition at line 310 of file HeaderGenerator.cpp.
References Generator::mOutputFile, and RegisterName().
|
protectedvirtual |
Implements Generator.
Definition at line 329 of file HeaderGenerator.cpp.
|
protected |
Definition at line 37 of file HeaderGenerator.cpp.
References mNamesUsed.
Referenced by ProcessBool(), ProcessBuffer(), ProcessDict(), ProcessDictInt(), ProcessDictRaw(), ProcessDictStr(), ProcessElement(), ProcessElementPtr(), ProcessInt(), ProcessList(), ProcessListInt(), ProcessListLong(), ProcessListStr(), ProcessLong(), ProcessObjectEx(), ProcessRaw(), ProcessReal(), ProcessString(), ProcessToken(), ProcessTuple(), and ProcessWString().
|
protected |
Definition at line 55 of file HeaderGenerator.cpp.
References XMLParserEx::AddMemberParser(), ProcessDictInlineEntry(), and Generator::RegisterProcessors().
Referenced by ClassHeaderGenerator().
|
private |
Definition at line 84 of file HeaderGenerator.h.
Referenced by ClearNames(), and RegisterName().