EvEmu
0.8.4
11 September 2021
|
#include "DecodeGenerator.h"
Public Member Functions | |
ClassDecodeGenerator (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 | |
const char * | top () const |
void | pop () |
void | push (const char *v) |
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 | 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 | |
const char * | mName |
std::stack< std::string > | mVariableStack |
uint32 | mItemNumber |
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 DecodeGenerator.h.
ClassDecodeGenerator::ClassDecodeGenerator | ( | FILE * | outputFile = NULL | ) |
Definition at line 32 of file DecodeGenerator.cpp.
References Generator::RegisterProcessors().
|
inlineprotected |
Definition at line 39 of file DecodeGenerator.h.
References mVariableStack.
Referenced by ProcessBool(), ProcessBuffer(), ProcessDict(), ProcessDictInline(), ProcessDictInt(), ProcessDictRaw(), ProcessDictStr(), ProcessElement(), ProcessElementPtr(), ProcessInt(), ProcessList(), ProcessListInline(), ProcessListInt(), ProcessListLong(), ProcessListStr(), ProcessLong(), ProcessNone(), ProcessObject(), ProcessObjectEx(), ProcessObjectInline(), ProcessRaw(), ProcessReal(), ProcessString(), ProcessStringInline(), ProcessSubStreamInline(), ProcessSubStructInline(), ProcessToken(), ProcessTokenInline(), ProcessTuple(), ProcessTupleInline(), ProcessWString(), and ProcessWStringInline().
|
protectedvirtual |
Implements Generator.
Definition at line 328 of file DecodeGenerator.cpp.
References Generator::mOutputFile, pop(), and top().
|
protectedvirtual |
Implements Generator.
Definition at line 358 of file DecodeGenerator.cpp.
References mName, Generator::mOutputFile, pop(), and top().
|
protectedvirtual |
Implements Generator.
Definition at line 1120 of file DecodeGenerator.cpp.
References mName, Generator::mOutputFile, pop(), str2< bool >(), and top().
|
protectedvirtual |
Implements Generator.
Definition at line 1173 of file DecodeGenerator.cpp.
References key(), mItemNumber, mName, Generator::mOutputFile, XMLParser::ParseElementChildren(), pop(), push(), snprintf, str2< bool >(), and top().
|
protectedvirtual |
Implements Generator.
Definition at line 1417 of file DecodeGenerator.cpp.
References mItemNumber, mName, Generator::mOutputFile, pop(), snprintf, and top().
|
protectedvirtual |
Implements Generator.
Definition at line 1340 of file DecodeGenerator.cpp.
References key(), mItemNumber, mName, Generator::mOutputFile, pop(), snprintf, and top().
|
protectedvirtual |
Implements Generator.
Definition at line 1463 of file DecodeGenerator.cpp.
References mItemNumber, mName, Generator::mOutputFile, pop(), snprintf, and top().
|
protectedvirtual |
Implements Generator.
Definition at line 81 of file DecodeGenerator.cpp.
References mName, Generator::mOutputFile, pop(), and top().
|
protectedvirtual |
Implements Generator.
Definition at line 40 of file DecodeGenerator.cpp.
References _log, Generator::GetEncodeType(), main(), mItemNumber, mName, Generator::mOutputFile, XMLParser::ParseElement(), and push().
|
protectedvirtual |
Implements Generator.
Definition at line 103 of file DecodeGenerator.cpp.
References _log, mName, Generator::mOutputFile, pop(), and top().
|
protectedvirtual |
Implements Generator.
Definition at line 201 of file DecodeGenerator.cpp.
References Generator::mOutputFile, pop(), and top().
|
protectedvirtual |
Implements Generator.
Definition at line 873 of file DecodeGenerator.cpp.
References mName, Generator::mOutputFile, pop(), str2< bool >(), and top().
|
protectedvirtual |
Implements Generator.
Definition at line 921 of file DecodeGenerator.cpp.
References mItemNumber, mName, Generator::mOutputFile, XMLParser::ParseElementChildren(), pop(), push(), snprintf, and top().
|
protectedvirtual |
Implements Generator.
Definition at line 969 of file DecodeGenerator.cpp.
References mItemNumber, mName, Generator::mOutputFile, pop(), snprintf, and top().
|
protectedvirtual |
Implements Generator.
Definition at line 1017 of file DecodeGenerator.cpp.
References mItemNumber, mName, Generator::mOutputFile, pop(), snprintf, and top().
|
protectedvirtual |
Implements Generator.
Definition at line 1072 of file DecodeGenerator.cpp.
References mItemNumber, mName, Generator::mOutputFile, pop(), snprintf, and top().
|
protectedvirtual |
Implements Generator.
Definition at line 268 of file DecodeGenerator.cpp.
References Generator::mOutputFile, pop(), and top().
|
protectedvirtual |
Implements Generator.
Definition at line 343 of file DecodeGenerator.cpp.
References mName, Generator::mOutputFile, pop(), and top().
|
protectedvirtual |
Implements Generator.
Definition at line 642 of file DecodeGenerator.cpp.
References mName, Generator::mOutputFile, pop(), str2< bool >(), and top().
|
protectedvirtual |
Implements Generator.
Definition at line 724 of file DecodeGenerator.cpp.
References mName, Generator::mOutputFile, pop(), str2< bool >(), and top().
|
protectedvirtual |
Implements Generator.
Definition at line 691 of file DecodeGenerator.cpp.
References mItemNumber, mName, Generator::mOutputFile, XMLParser::ParseElementChildren(), pop(), push(), snprintf, and top().
|
protectedvirtual |
Implements Generator.
Definition at line 136 of file DecodeGenerator.cpp.
References Generator::mOutputFile, pop(), and top().
|
protectedvirtual |
Implements Generator.
Definition at line 283 of file DecodeGenerator.cpp.
References mName, Generator::mOutputFile, pop(), and top().
|
protectedvirtual |
Implements Generator.
Definition at line 391 of file DecodeGenerator.cpp.
References mName, Generator::mOutputFile, pop(), and top().
|
protectedvirtual |
Implements Generator.
Definition at line 442 of file DecodeGenerator.cpp.
References _log, mItemNumber, mName, Generator::mOutputFile, pop(), snprintf, and top().
|
protectedvirtual |
Implements Generator.
Definition at line 1509 of file DecodeGenerator.cpp.
References mItemNumber, mName, Generator::mOutputFile, XMLParser::ParseElementChildren(), pop(), push(), snprintf, and top().
|
protectedvirtual |
Implements Generator.
Definition at line 1548 of file DecodeGenerator.cpp.
References mItemNumber, mName, Generator::mOutputFile, XMLParser::ParseElementChildren(), pop(), push(), snprintf, and top().
|
protectedvirtual |
Implements Generator.
Definition at line 561 of file DecodeGenerator.cpp.
References mName, Generator::mOutputFile, pop(), str2< bool >(), and top().
|
protectedvirtual |
Implements Generator.
Definition at line 608 of file DecodeGenerator.cpp.
References _log, mItemNumber, mName, Generator::mOutputFile, pop(), snprintf, and top().
|
protectedvirtual |
Implements Generator.
Definition at line 777 of file DecodeGenerator.cpp.
References mName, Generator::mOutputFile, pop(), str2< bool >(), and top().
|
protectedvirtual |
Implements Generator.
Definition at line 824 of file DecodeGenerator.cpp.
References mItemNumber, mName, Generator::mOutputFile, XMLParser::ParseElementChildren(), pop(), push(), snprintf, and top().
|
protectedvirtual |
Implements Generator.
Definition at line 476 of file DecodeGenerator.cpp.
References mName, Generator::mOutputFile, pop(), and top().
|
protectedvirtual |
Implements Generator.
Definition at line 527 of file DecodeGenerator.cpp.
References _log, mItemNumber, mName, Generator::mOutputFile, pop(), snprintf, and top().
|
inlineprotected |
Definition at line 40 of file DecodeGenerator.h.
References mVariableStack.
Referenced by ProcessDictInline(), ProcessElementDef(), ProcessListInline(), ProcessObjectInline(), ProcessSubStreamInline(), ProcessSubStructInline(), and ProcessTupleInline().
|
inlineprotected |
Definition at line 38 of file DecodeGenerator.h.
References mVariableStack.
Referenced by ProcessBool(), ProcessBuffer(), ProcessDict(), ProcessDictInline(), ProcessDictInt(), ProcessDictRaw(), ProcessDictStr(), ProcessElement(), ProcessElementPtr(), ProcessInt(), ProcessList(), ProcessListInline(), ProcessListInt(), ProcessListLong(), ProcessListStr(), ProcessLong(), ProcessNone(), ProcessObject(), ProcessObjectEx(), ProcessObjectInline(), ProcessRaw(), ProcessReal(), ProcessString(), ProcessStringInline(), ProcessSubStreamInline(), ProcessSubStructInline(), ProcessToken(), ProcessTokenInline(), ProcessTuple(), ProcessTupleInline(), ProcessWString(), and ProcessWStringInline().
|
private |
Definition at line 84 of file DecodeGenerator.h.
Referenced by ProcessDictInline(), ProcessDictInt(), ProcessDictRaw(), ProcessDictStr(), ProcessElementDef(), ProcessListInline(), ProcessListInt(), ProcessListLong(), ProcessListStr(), ProcessObjectInline(), ProcessStringInline(), ProcessSubStreamInline(), ProcessSubStructInline(), ProcessTokenInline(), ProcessTupleInline(), and ProcessWStringInline().
|
private |
Definition at line 82 of file DecodeGenerator.h.
Referenced by ProcessBuffer(), ProcessDict(), ProcessDictInline(), ProcessDictInt(), ProcessDictRaw(), ProcessDictStr(), ProcessElement(), ProcessElementDef(), ProcessElementPtr(), ProcessList(), ProcessListInline(), ProcessListInt(), ProcessListLong(), ProcessListStr(), ProcessNone(), ProcessObject(), ProcessObjectEx(), ProcessObjectInline(), ProcessReal(), ProcessString(), ProcessStringInline(), ProcessSubStreamInline(), ProcessSubStructInline(), ProcessToken(), ProcessTokenInline(), ProcessTuple(), ProcessTupleInline(), ProcessWString(), and ProcessWStringInline().
|
private |
Definition at line 83 of file DecodeGenerator.h.