34 "/* EVEmu: EVE Online Server Emulator\n"
36 " **************************************************************\n"
37 " This file is automatically generated, DO NOT EDIT IT DIRECTLY.\n"
38 " **************************************************************\n"
40 " (If you need to customize an object, you must copy that object\n"
41 " into another source file, and give up the ability to generate it)\n"
44 " This program is free software; you can redistribute it and/or modify\n"
45 " it under the terms of the GNU General Public License as published by\n"
46 " the Free Software Foundation; version 2 of the License.\n"
48 " This program is distributed in the hope that it will be useful,\n"
49 " but WITHOUT ANY WARRANTY except by those people which sell it, which\n"
50 " are required to give you total support for your newly bought product;\n"
51 " without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n"
52 " A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n"
54 " You should have received a copy of the GNU General Public License\n"
55 " along with this program; if not, write to the Free Software\n"
56 " Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n"
58 " Updated by Allan, 2016 - 2020"
63 : mHeaderFile( NULL ),
64 mHeaderFileName( header ),
66 mSourceFileName( source )
84 sLog.Error(
"XMLPacketGen",
"Unable to open output files: %s.", strerror( errno ) );
97 "#include \"python/PyVisitor.h\"\n"
98 "#include \"python/PyRep.h\"\n"
107 "#include \"eve-common.h\"\n"
130 const char* file = field->Attribute(
"file" );
133 _log( COMMON__ERROR,
"field at line %d is missing the file attribute, skipping.", field->Row() );
240 for(;
'\0' != *buf; ++buf )
242 if( !
IsPrintable( *buf ) || *buf ==
'/' || *buf ==
'\\' || *buf ==
':' || *buf ==
'.' || *buf ==
'-' )
245 res += (char)toupper( *buf );
bool ParseElement(const TiXmlElement *element) const
Parses element using registered parsers.
#define _log(type, fmt,...)
static const char *const smGenFileComment
bool ParseElementDef(const TiXmlElement *field)
bool ParseInclude(const TiXmlElement *field)
ClassCloneGenerator mClone
std::string mHeaderFileName
void SetOutputFile(FILE *outputFile)
Sets output file.
bool IsPrintable(const PyString *str)
Checks whether string is printable.
#define sLog
Evaluates to a NewLog instance.
ClassConstructGenerator mConstruct
static std::string FNameToDef(const char *buf)
ClassDecodeGenerator mDecode
void SetHeaderFile(const char *header)
Sets header file.
XMLPacketGen(const char *header="", const char *source="")
Primary constructor.
ClassDestructGenerator mDestruct
ClassHeaderGenerator mHeader
bool OpenFiles()
Opens output files.
void SetSourceFile(const char *source)
Sets source file.
ClassEncodeGenerator mEncode
std::string mSourceFileName
bool ParseElementChildren(const TiXmlElement *element, size_t max=0) const
Parses element's children using registered parsers.
~XMLPacketGen()
Destructory; closes output files.
void AddMemberParser(const char *name, T &instance, bool(T::*method)(const TiXmlElement *))
Adds a member parser.
bool ParseElements(const TiXmlElement *field)