49 const char* name = field->Attribute(
"name" );
50 if (name ==
nullptr) {
51 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
56 "void %s::Dump( LogType l_type, const char* pfx ) const\n"
58 " _log( l_type, \"%%s%s\", pfx );\n"
76 const char* name = field->Attribute(
"name" );
77 if (name ==
nullptr) {
78 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
83 " _log( l_type, \"%%s%s:\", pfx );\n"
85 " std::string %s_n( pfx );\n"
87 " %s.Dump( l_type, %s_n.c_str() );\n"
98 const char* name = field->Attribute(
"name" );
99 if (name ==
nullptr) {
100 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
105 " _log( l_type, \"%%s%s:\", pfx );\n"
107 " std::string %s_n( pfx );\n"
109 " if (%s != nullptr)\n"
110 " %s->Dump( l_type, %s_n.c_str() );\n"
112 " _log( l_type, \"%%sERROR: ElementPtr = nullptr.\", %s_n.c_str() );\n"
114 name, name, name, name,
123 const char* name = field->Attribute(
"name" );
124 if (name ==
nullptr) {
125 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
130 " _log( l_type, \"%%s%s:\", pfx );\n"
132 " std::string %s_n( pfx );\n"
134 " if (%s != nullptr)\n"
135 " %s->Dump( l_type, %s_n.c_str() );\n"
137 " _log( l_type, \"%%sERROR: raw = nullptr.\", %s_n.c_str() );\n"
139 name, name, name, name,
148 const char* name = field->Attribute(
"name" );
149 if (name ==
nullptr) {
150 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
155 " _log( l_type, \"%%s%s=%%u\", pfx, %s );\n"
165 const char* name = field->Attribute(
"name" );
166 if (name ==
nullptr) {
167 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
172 " _log( l_type, \"%%s%s=%%\" PRId64, pfx, %s );\n"
182 const char* name = field->Attribute(
"name" );
183 if (name ==
nullptr) {
184 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
189 " _log( l_type, \"%%s%s=%%.13f\", pfx, %s );\n"
199 const char* name = field->Attribute(
"name" );
200 if (name ==
nullptr) {
201 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
206 " _log( l_type, \"%%s%s=%%s\", pfx, %s ? \"true\" : \"false\" );\n"
221 const char* name = field->Attribute(
"name" );
222 if (name ==
nullptr) {
223 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
228 " _log( l_type, \"%%s%s: \", pfx );\n"
230 " std::string %s_n( pfx );\n"
232 " %s->Dump( l_type, %s_n.c_str() );\n"
243 const char* name = field->Attribute(
"name" );
244 if (name ==
nullptr) {
245 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
250 " _log( l_type, \"%%s%s='%%s'\", pfx, %s.c_str() );\n"
260 const char* value = field->Attribute(
"value" );
261 if (value ==
nullptr) {
262 std::cout << std::endl <<
"string element at line " << field->Row() <<
" has no value attribute, skipping.";
267 " _log( l_type, \"%%sString '%s'\", pfx );\n"
277 const char* name = field->Attribute(
"name" );
278 if (name ==
nullptr) {
279 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
284 " _log( l_type, \"%%s%s='%%s'\", pfx, %s.c_str() );\n"
294 const char* value = field->Attribute(
"value" );
295 if (value ==
nullptr) {
296 std::cout << std::endl <<
"wstring element at line " << field->Row() <<
" has no value attribute, skipping.";
301 " _log( l_type, \"%%sWString '%s'\", pfx );\n"
311 const char* name = field->Attribute(
"name" );
312 if (name ==
nullptr) {
313 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
318 " _log( l_type, \"%%s%s:\", pfx );\n"
320 " std::string %s_n( pfx );\n"
322 " if (%s != nullptr)\n"
323 " %s->Dump( l_type, %s_n.c_str() );\n"
325 " _log( l_type, \"%%sERROR: token = nullptr.\", %s_n.c_str() );\n"
327 name, name, name, name,
336 const char* value = field->Attribute(
"value" );
337 if (value ==
nullptr) {
338 std::cout << std::endl <<
"token element at line " << field->Row() <<
" has no value attribute, skipping.";
343 " _log( l_type, \"%%sToken '%s'\", pfx );\n"
353 const char* name = field->Attribute(
"name" );
354 if (name ==
nullptr) {
355 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
360 " _log( l_type, \"%%s%s:\", pfx );\n"
362 " std::string %s_n( pfx );\n"
364 " if (%s != nullptr)\n"
365 " %s->Dump( l_type, %s_n.c_str() );\n"
367 " _log( l_type, \"%%s nullptr\", pfx );\n"
379 " _log( l_type, \"%%sObject:\", pfx );\n"
388 const char* name = field->Attribute(
"name" );
389 if (name ==
nullptr) {
390 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
393 const char* type = field->Attribute(
"type" );
394 if (type ==
nullptr) {
395 std::cout << std::endl <<
"field at line " << field->Row() <<
" is missing the type attribute, skipping.";
400 " _log( l_type, \"%%s%s (%s):\", pfx );\n"
402 " std::string %s_n( pfx );\n"
404 " if (%s != nullptr)\n"
405 " %s->Dump( l_type, %s_n.c_str() );\n"
407 " _log( l_type, \"%%s nullptr\", pfx );\n"
410 name, name, name, name
418 const char* name = field->Attribute(
"name" );
419 if (name ==
nullptr) {
420 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
425 " _log( l_type, \"%%s%s:\", pfx );\n"
427 " std::string %s_n( pfx );\n"
429 " if (%s != nullptr)\n"
430 " %s->Dump( l_type, %s_n.c_str() );\n"
432 " _log( l_type, \"%%sERROR: tuple = nullptr.\", %s_n.c_str() );\n"
435 name, name, name, name
449 const char* name = field->Attribute(
"name" );
450 if (name ==
nullptr) {
451 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
456 " _log( l_type, \"%%s%s:\", pfx );\n"
458 " std::string %s_n( pfx );\n"
460 " if (%s != nullptr)\n"
461 " %s->Dump( l_type, %s_n.c_str() );\n"
463 " _log( l_type, \"%%sERROR: list = nullptr.\", %s_n.c_str() );\n"
466 name, name, name, name
480 const char* name = field->Attribute(
"name" );
481 if (name ==
nullptr) {
482 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
487 " _log( l_type, \"%%s%s: Integer list with %%lu entries\", pfx, %s.size() );\n"
489 " std::vector<int32>::const_iterator cur = %s.begin();\n"
490 " for (int index = 0; cur != %s.end(); ++cur, ++index )\n"
491 " _log( l_type, \"%%s [%%02d] %%d\", pfx, index, (*cur) );\n"
493 name, name, name, name
501 const char* name = field->Attribute(
"name" );
502 if (name ==
nullptr) {
503 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
508 " _log( l_type, \"%%s%s: Integer list with %%lu entries\", pfx, %s.size() );\n"
510 " std::vector<int64>::const_iterator cur = %s.begin();\n"
511 " for (int index = 0; cur != %s.end(); ++cur, ++index )\n"
512 " _log( l_type, \"%%s [%%02d] %%li\", pfx, index, (*cur) );\n"
514 name, name, name, name
522 const char* name = field->Attribute(
"name" );
523 if (name ==
nullptr) {
524 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
529 " std::vector<std::string>::const_iterator %s_cur = %s.begin(), %s_end = %s.end();\n"
530 " for (int index = 0; %s_cur != %s_end; ++%s_cur, ++index )\n"
531 " _log( l_type, \"%%s [%%02d] %%s\", pfx, index, ( *%s_cur ).c_str() );\n"
533 name, name, name, name,
534 name, name, name, name
542 const char* name = field->Attribute(
"name" );
543 if (name ==
nullptr) {
544 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
549 " _log( l_type, \"%%s%s:\", pfx );\n"
551 " std::string %s_n( pfx );\n"
553 " if (%s != nullptr)\n"
554 " %s->Dump( l_type, %s_n.c_str() );\n"
556 " _log( l_type, \"%%sERROR: dict = nullptr.\", %s_n.c_str() );\n"
559 name, name, name, name
574 const char*
key = field->Attribute(
"key" );
575 if (key ==
nullptr) {
576 std::cout << std::endl <<
"<dictInlineEntry> at line " << field->Row() <<
" is missing the key attribute, skipping.";
585 const char* name = field->Attribute(
"name" );
586 if (name ==
nullptr) {
587 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
591 const char*
key = field->Attribute(
"key" );
592 if (key ==
nullptr) {
593 std::cout << std::endl <<
"field at line " << field->Row() <<
" is missing the key attribute, skipping.";
596 const char* pykey = field->Attribute(
"pykey" );
597 if (pykey ==
nullptr) {
598 std::cout << std::endl <<
"field at line " << field->Row() <<
" is missing the pykey attribute, skipping.";
601 const char* value = field->Attribute(
"value" );
602 if (value ==
nullptr) {
603 std::cout << std::endl <<
"field at line " << field->Row() <<
" is missing the value attribute, skipping.";
606 const char* pyvalue = field->Attribute(
"pyvalue" );
607 if (pyvalue ==
nullptr) {
608 std::cout << std::endl <<
"field at line " << field->Row() <<
" is missing the pyvalue attribute, skipping.";
616 " _log( l_type, \"%%s%s: Dictionary with %%lu entries\", pfx, %s.size() );\n"
618 " /* total crap casting here since we do not know the correct printf format */\n"
619 " for (auto cur : %s)\n"
620 " _log( l_type, \"%%s Key: %%u -> Value: %%u\", pfx, uint32(cur.first), uint32(cur.second));\n"
630 const char* name = field->Attribute(
"name" );
631 if (name ==
nullptr) {
632 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
637 " _log( l_type, \"%%s%s: Dictionary with %%lu entries\", pfx, %s.size() );\n"
639 " for (auto cur : %s) {\n"
640 " _log( l_type, \"%%s Key: %%u\", pfx, cur.first );\n"
641 " std::string n( pfx );\n"
643 " cur.second->Dump( l_type, n.c_str() );\n"
654 const char* name = field->Attribute(
"name" );
655 if (name ==
nullptr) {
656 std::cout << std::endl <<
"name field at line " << field->Row() <<
" is missing the name attribute, skipping.";
661 " _log( l_type, \"%%s%s: Dictionary with %%lu entries\", pfx, %s.size() );\n"
663 " for (auto cur : %s) {\n"
664 " _log( l_type, \"%%s Key: %%s\", pfx, cur.first.c_str() );\n"
665 " std::string n( pfx );\n"
667 " cur.second->Dump( l_type, n.c_str() );\n"
bool ProcessDictInline(const TiXmlElement *field)
bool ProcessDictInlineEntry(const TiXmlElement *field)
bool ProcessWString(const TiXmlElement *field)
bool ProcessElementPtr(const TiXmlElement *field)
bool ProcessNone(const TiXmlElement *field)
bool ProcessRaw(const TiXmlElement *field)
bool ProcessList(const TiXmlElement *field)
bool ProcessSubStreamInline(const TiXmlElement *field)
bool ProcessDictRaw(const TiXmlElement *field)
void RegisterProcessors()
bool ProcessString(const TiXmlElement *field)
bool ProcessTokenInline(const TiXmlElement *field)
bool ProcessToken(const TiXmlElement *field)
bool ProcessObjectEx(const TiXmlElement *field)
bool ProcessTupleInline(const TiXmlElement *field)
bool ProcessBool(const TiXmlElement *field)
bool ProcessTuple(const TiXmlElement *field)
bool ProcessDictStr(const TiXmlElement *field)
bool ProcessListStr(const TiXmlElement *field)
bool ProcessObjectInline(const TiXmlElement *field)
bool ProcessStringInline(const TiXmlElement *field)
bool ProcessInt(const TiXmlElement *field)
ClassDumpGenerator(FILE *outputFile=NULL)
bool ProcessReal(const TiXmlElement *field)
bool ProcessBuffer(const TiXmlElement *field)
bool ProcessObject(const TiXmlElement *field)
bool ProcessElementDef(const TiXmlElement *field)
Generic class for eve-xmlpktgen's generators.
void RegisterProcessors()
bool ProcessLong(const TiXmlElement *field)
bool ParseElementChildren(const TiXmlElement *element, size_t max=0) const
Parses element's children using registered parsers.
bool ProcessWStringInline(const TiXmlElement *field)
bool ProcessDictInt(const TiXmlElement *field)
bool ProcessDict(const TiXmlElement *field)
typeID Spawn an NPC with the specified type text Search for items matching the specified query() type() key(value)-Send an OnRemoteMessage" ) COMMAND( setbpattr
bool ProcessElement(const TiXmlElement *field)
bool ProcessListInline(const TiXmlElement *field)
bool ProcessListLong(const TiXmlElement *field)
bool ProcessListInt(const TiXmlElement *field)
bool ProcessSubStructInline(const TiXmlElement *field)
void AddMemberParser(const char *name, T &instance, bool(T::*method)(const TiXmlElement *))
Adds a member parser.